package com.walker.jdkapi.future;

public class FutureClient {
	
	public Data getReqest(final String requestData) {
		final ProxyData proxyData = new ProxyData();
		//直接返回代理对象，启动线程，设置代理对象中的目标对象（真实数据）
		Thread thread = new Thread(new Runnable() {
			
			@Override
			public void run() {
				TargetData targetData = new TargetData(requestData);
				proxyData.setTargetData(targetData);
			}
		});
		thread.start();
		return proxyData;
	}

}
